package com.haidechizi.util.lock.holder;

import com.haidechizi.util.lock.DistributeLock;

import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

/**
 * @author: wangdejun
 * @create: 2019-11-12 17:11
 **/
public class DistributeLockHolder {

    private static final Map<String, DistributeLock> map = new ConcurrentHashMap<>(8);

    public static final void putLock(String type, DistributeLock distributeLock) {
        map.put(type, distributeLock);
    }

    public static final DistributeLock getLock(String type) {
        return map.get(type);
    }


}
